package com.luxsoft.sw3.bi.alta;

import com.luxsoft.siipap.swing.Application;
import com.luxsoft.siipap.swing.actions.SWXAction;

public class ShowAltA extends SWXAction{
	
	private AltAMainFrame window;
	

	@Override
	protected void execute() {
		if(Application.isLoaded()){
			getWindow().open(false);			
		}
		getWindow().open(true);		
	}

	public AltAMainFrame getWindow() {
		return window;
	}

	public void setWindow(AltAMainFrame window) {
		this.window = window;
	}
	
	
	/**
	 * Prueba local en el EDT
	 * 
	 * @param args
	 * 
	 */
	public static void main(String[] args) {
		javax.swing.SwingUtilities.invokeLater(new Runnable() {

			public void run() {
				com.luxsoft.siipap.swing.utils.SWExtUIManager.setup();
				final AltAController controller=new AltAController();
				ShowAltA alt=new ShowAltA();
				AltAMainFrame window=new AltAMainFrame(controller);
				alt.setWindow(window);
				alt.execute();
				//System.exit(0);
			}

		});
	}	
	

}
